{extend name="base" /}
{block name="title"}{$userInfo['nickname']}-认证身份|程序员的收藏夹-专注于程序员学习、分享{/block}

{block name="style"}
<style type="text/css">
	.box-title.icon::before{
		color: #4a4a4a;
	}
</style>
{/block}

{block name="header"}
	{include file="public/user_header" /}
{/block}

{block name="content"}
<div class="zbd-content">
	<div class="page">
		<div class="user-home">
			<div class="home-menu left yy">
				{include file="public/user_left_nav" /}
			</div>
			<div class="home-body right">
				<div class="row">
					<div class="w12">
						<div class="box yy">
							<div class="box-title icon ice-page-list">
								<div class="left bold">应用密钥</div>
							</div>
							<div class="box-content">
								<div class="profile">
									{if condition="$userInfo['auth_type'] == 1"}
									<div class="row">
									    <div class="group-input w7">
									        <div class="group-label bg-green zbd-w100">APP_KEY</div>
									        <input type="text" placeholder="{$userInfo['auth_app_key']|default='未生成'}" value="{$userInfo['auth_app_key']|default=''}" disabled>
									        <div class="group-label btn bg-gray" onclick="ice.copy('{$userInfo.auth_app_key}');ice.pop({content:'已复制',icon:'none'})">复制</div>
									    </div>
									</div>
									<div class="row">
									    <div class="group-input w7">
									        <div class="group-label bg-green zbd-w100">APP_SECRET</div>
									        <input type="text" placeholder="{$userInfo['auth_app_secret']|default='未生成'}" value="{$userInfo['auth_app_secret']|default=''}" disabled>
									        <div class="group-label btn bg-gray" onclick="ice.copy('{$userInfo.auth_app_secret}');ice.pop({content:'已复制',icon:'none'})">复制</div>
									    </div>
									</div>

									<div class="row">
										<a href="javascript:;" onclick="ui.del('/user/open?type=1', '确认生成新密钥？旧的即时失效，请谨慎操作密钥！')" class="ml5 btn bg-red btn-shadow"><i class="icon ice-font-bgcolor"></i>生成密钥</a>
									</div>
									{else /}
									<div class="tip bg-red">
										<div class="title-l">请先认证身份</div>
									</div>
									{/if}
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
{/block}